import request from '@/utils/request'

// 查询招聘列表
export function listRecuit(query) {
  return request({
    url: '/system/recuit/list',
    method: 'get',
    params: query
  })
}

// 查询招聘详细信息
export function getRecuit(id) {
  return request({
    url: '/web/recuit/' + id,
    method: 'get'
  })
}

// 新增招聘信息
export function addRecuit(data) {
  return request({
    url: '/web/recuit',
    method: 'post',
    data: data
  })
}

// 修改招聘信息
export function updateRecuit(data) {
  return request({
    url: '/web/recuit',
    method: 'put',
    data: data
  })
}

// 删除招聘简历
export function delRecuit(id) {
  return request({
    url: '/web/recuit/' + id,
    method: 'delete'
  })
}

// 通过/驳回招聘需求
export function isOrNotPublish(query) {
  return request({
    url: '/system/recuit/isOrNotPublish',
    method: 'get',
    params: query
  })
}
